package com.cdut.drivingschool.ui.main;

import com.cdut.drivingschool.R;
import com.cdut.drivingschool.bean.BaseType;
import com.cdut.drivingschool.config.Key;
import com.cdut.drivingschool.http.HttpClient;
import com.cdut.drivingschool.http.RequestParams;
import com.cdut.drivingschool.listener.HttpListener;

import android.os.Bundle;

public class SchoolDetailActivity extends BaseActivity{
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_school_detail);
		setTitle("乘风驾校");
		
	}

	@Override
	protected void initViews() {
		getDetail(getIntent().getIntExtra(Key.SCHOOL_ID, 0));
	}
	public void getDetail(int school_id){
		RequestParams params = new RequestParams();
		params.addBodyParameter("school_id", school_id+"");
		HttpClient.request("get_schoolmoreinfo_one.php", params, null, new HttpListener() {
			
			@Override
			public void onSuccess(BaseType data) {
				showToastMsg("成功");
			}
			
			@Override
			public void onFail(String erro_msg) {
				
			}
		});
	}
}
